-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
csplit: clarify how the regex option works #19157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
sbrl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me! wording improvement is good, yesyes 🌟
pages/linux/csplit.md
Outdated
| `csplit {{path/to/file}} 5 {{[-f|--prefix]}} {{prefix}}` | ||
|
|
||
| - Split a file at a line matching a `regex`: | ||
| - Split a file at the first line matching a `regex`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before or after the detected line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The split is before the matching line, good point. But this clarification might warrant also updating the other examples too. I'll look into that later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reworked the whole page to clarify where the splits occur. Please re-review and let me know if this looks good to you. (@sbrl you may want to reassess too 🙂)
e18e26d to
8fd47fe
Compare
|
Please don't force push |
Are we not supposed to rebase the branch when it gets outdated? What if there are conflicts? |
|
The github UI will warn in the case of conflicts. They are a non-issue. |
|
Right, that's a good point. It's a pity that we still have to rely on untidy commit histories to avoid breaking the code review experience, which should be the responsibility of the forge, i.e. GitHub. Hopefully novel approaches like GitButler's patch-based code review system and stable change IDs (like those used by jj) will catch on, so that we can have our cake and eat it too (i.e. have clean commit histories but also be able to follow the evolution of a patchset during review). For the time being, I'll refrain from force-pushing except to resolve conflicts. |
|
Every PR gets squshed before merge. An untidy commit history is a non-issue. |
| > More information: <https://www.gnu.org/software/coreutils/manual/html_node/csplit-invocation.html>. | ||
| - Split a file at lines 5 and 23: | ||
| - Split a file in two parts, starting the second one at line 10: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still sort of ambiguous. Are you starting it before or after line 10.
Checklist
common,linux,osx,windows,sunos,android, etc.Reference issue: #